<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ page isELIgnored="false"%>
<%@ include file="../common/taglibs.jsp"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>

<title>POS收单运营管理平台</title>

<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
<meta http-equiv="description" content="This is my page">
<title>黑名单批量导入</title>
<link rel="icon" href="favicon.ico" type="image/x-icon" />
<!-- 当前页面样式 -->
<link rel="stylesheet" href="<s:url value="/css/common.css"/>" />
<!-- 当前页面样式 END -->
<script type="text/javascript"
	src="<c:url value="/js/jquery-1.3.2.js" />"></script>
<script type="text/javascript" src="<c:url value="/js/common.js" />"></script>
<script language="javascript" type="text/javascript"
	src="<c:url value="/js/My97DatePicker/WdatePicker.js"/>"></script>
<script type='text/javascript' src='<s:url value="/dwr/engine.js"/>'></script>
<script type='text/javascript'
	src='<s:url value="/dwr/interface/MccQuery.js"/>'></script>

<script type="text/javascript">
	
	function importSubmit(){
		var upload = $.trim($("#upload").val());
		if(!upload){
			alert("请选择要上传的文件");
			return false;
		}
		var suffix = upload.substring(upload.lastIndexOf(".")+1);
		if("xlsx" != suffix){
			alert("请上传后缀名为xlsx的文件");
			return false;
		}
		
		$("#exportBlackListForm").attr("action","<%=basePath%>/blacklist/addblacklist.ct");
		$("#exportBlackListForm").submit();
		//$("#exportBtn").attr("disabled",true);
		
	}
</script>



</head>

<body>

	<s:form id="exportBlackListForm" action="" method="post"
		theme="simple" enctype="multipart/form-data">
		<table class="tb">
			<tbody>
				<tr class="tb-line">
					<td class="tb-td" colspan="4"><div class="tb-h2">POS收单运营管理平台</div></td>
				</tr>

				<tr class="tb-line">
					<td class="tb-td" colspan="4"><div class="tb-h3">黑名单批量导入</div></td>
				</tr>

				<tr class="tb-line">
					<td width="12%" style="min-width: 100px" align="right" class="tb-td">
					<div class="tb-h4">黑名单批量导入：</div>
					</td>
					<td class="tb-td">
					<label>
					<s:file id="upload" name="file"></s:file>
					</label>
					</td>
					<td class="tb-td line-submit" style="min-width: 300px;text-align: left;" colspan="2">									
					<label class="tb-input-submit">
					<input type="button" id="exportBtn" onclick="importSubmit();" value="导入"/>
					</label>
					<label class="tb-input-submit">
					<input type="button" id="backBtn" onclick="history.back();" value="返回"/>
					</label>
					</td>					
				</tr>


				<tr>
					<td class="tb-td" colspan="4" align="center"><span style="color: red"><s:actionerror /></span>
						<span style="color: red"> <s:actionmessage /></span> <span
						style="color: red;"><s:fielderror
								cssClass="fieldError" /></span> <span id="otherError"
						style="color: red"></span></td>
				</tr>

				<tr>
					<td colspan="4">&nbsp;<s:token></s:token></td>
				</tr>
				<tr>
				<td colspan="4" style="color:green;">
				提示:<br/>
				1.导入文件的后缀为xlsx。<br/>
				2.上传文件列名为"卡号或商户号","类型","原因","状态"。必须一一对应。<br/>
				3."类型"只能填写C,M,D,N,P,O;C代表黑卡,M代表黑商户,D代表法人身份证,N非法人身份证,P,代表手机号,O营业执照,注意是大写字母。<br/>
				4."状态"只能填写‘2’：代表待审核状态。
				</td>
				</tr>
			</tbody>
		</table>

	</s:form>
</body>
</html>